<template>
    <div class="checkNotesModal-content-box">
        <!-- :dialog-style="{ top: '40px' }" -->
         <!-- 技术审评笔记添加审评地点-->
        <a-modal
            :title="this.fromSate.id?'编辑审评地点':'新增审评地点'"
            :visible="visible"
            @ok="handleOk"
            @cancel="visible = false"
            :width="800"
            :forceRender="forceRender"
            class="checkNotesModal-modal-v"
        >
            <div class="checkNotesModal-modal-box-v" >
                <table border bordercolor="#d9d9d9" style="width: 100%;">
                    <tr>
                        <td class="title-left-v">
                            <span style="color: #ed5565;" >*</span>
                            审评地点
                        </td>
                        <td colspan="5">
                            <a-textarea 
                                v-model="fromSate.fddmc"
                                :autosize="{ minRows: 3, maxRows: 3 }"
                                placeholder="请输入审评地点"
                            ></a-textarea>
                        </td>
                    </tr>
                </table>
            </div>
        </a-modal>
    </div>
</template>
<script>
import {
    jcbjaddJcdd,
    jcbjupdateJcdd,
} from '../service/index'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
import assessCheckApi from '../service/api'
import blobType from '@/common/blobType'
import commpKindeditor from '@/components/commp-kindeditor/commpKindeditor.vue'
export default {
    components:{
        commpVxeTable,
        commpKindeditor,
    },
    props:{

    },
    data(){
        return{
            currentData:{},
            visible:false,
            chapterList:[],
            headList:[],
            spinning:false,
            spinningKey:null,
            dataTableKey:null,
            selectId:[],
            editvisible:false,
            selectData:{},
            isVisible:true,
            fromSate:{},
            commpKindeditorKey:null,
            checkNotesModalKey:null,
            forceRender:true,
            windowInnerHeight:window.innerHeight,
        }
    },
    watch:{

    },
    mounted(){
        
    },
    methods:{
        getData(val){
            this.fromSate = val
        },
        handleOk(){
            if(!this.fromSate.fddmc){
                this.$message.warning('请输入审评地点')
                return
            }
            if(this.fromSate.id){
                jcbjupdateJcdd(this.fromSate).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.$emit('addPlaceSuccessChange',this.fromSate)
                        this.visible = false
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                jcbjaddJcdd(this.fromSate).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.$emit('addPlaceSuccessChange',this.fromSate)
                        this.visible = false
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
            
        },
        
    }
}
</script>
<style lang="less">
.checkNotesModal-modal-v{
    .ant-modal-body{
        padding:8px;
    }
}
// .checkNotesModal-content-box{
    .extractsi-top-box{
        margin-top: 10px;
        display: flex;
        align-items: center;
        background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
        background-size: 100% 100% !important;
        padding:8px;
        border:1px solid #d9d9d9;
        .situation-left-title{
            display: inline-block;
            background-color: #e6f7ff;
            text-align: left;
            font-weight: 600;
            font-size: 16px;
            font-family: simHei;
            color: rgba(0, 0, 0, 0.85);
            margin-right: 8px;
        }
    }
    .checkNotesModal-modal-box-v{
        td{
            padding: 5px;
            height: 30px;
        }
        .title-left-v{
            text-align: center;
            width: 117px;
            font-weight: 600;
            font-size: 16px;
            background-color:#e6f7ff;
            font-family: simHei;
            color: rgba(0, 0, 0, 0.85);
        }
    }
// }


</style>